package com.ftg.learn.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ftg.learn.system.entity.Role;
import com.ftg.learn.system.mapper.RoleMapper;
import com.ftg.learn.system.service.IRoleService;
import com.ftg.learn.system.vo.RolePrivilegeVo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 角色表 服务实现类
 * </p>
 *
 * @author kangjx
 * @since 2023-04-28
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IRoleService {

    @Override
    public List<Integer> privilegeByRoleId(List<Integer> roleIds) {
        return this.getBaseMapper().allPrivilegeByRoleId(roleIds);
    }

    @Override
    public List<Integer> allRoleWithUserId(Integer userid) {
        return this.getBaseMapper().allRoleWithUserId(userid);
    }
}
